home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cdrtools-1.10 / README.multi < prev    next >
Encoding:
Text File  |  2000-06-04  |  4.0 KB  |  125 lines

  1. Creating multi-session CD's Mini Howto FAQ
  2.  
  3. Multi-session filesystems are a trick that comes from the Kodak photo CD.
  4. The OS mounts the last session that contains the sum of the current session
  5. and all previous sessions.
  6.  
  7. To test (with Linux):
  8.  
  9. Create a iso-9660 filesystem image with mkisofs-1.10 or later.
  10. mkisofs is included in the cdrecord release (including
  11. SunOS/Solaris multi-session support)
  12. Use the -R flag to add Rock Ridge extensions (this is important).
  13.  
  14. Assuming that the CD-R drive is connected to target 2 on the SCSI bus.
  15.  
  16. Write the first session with:
  17.  
  18. cdrecord -v speed=2 dev=2,0 -eject -multi isoimage.raw
  19.  
  20. This must be a iso9660 image with Rock Ridge extensions (see above)
  21.  
  22. Note the number of sectors written and check the disk, it should be mountable.
  23.  
  24. Next step is to check if cdrecord is able to retrieve the following data:
  25.  
  26.     1) The first block (sector) number in the first track of the last session
  27.        This must be '0' in our case.
  28.  
  29.     2) The next writable address in the unwritten session following the current.
  30.        This should be the number of sectors written in the first
  31.        run + ~ 11400 sectors for about 22MB lead out/in
  32.  
  33. To get this information type:
  34.  
  35. cdrecord -msinfo dev=2,0
  36.  
  37. The output should be two numbers separated by a comma.
  38.  
  39.     e.g.: 0,204562
  40.  
  41. The first number is (1), the second number is (2).
  42.  
  43. Create the image for the next session with mkisofs-1.12 or later.
  44. It is included in the cdrecord distribution.
  45.  
  46. 2nd session:
  47. You should create a directory that contains a second directory with data in it
  48. for this purpose.
  49.  
  50.     e.g.:
  51.         first_dir/
  52.             second_dir/
  53.                 file_1
  54.                 file_2
  55.                 ...
  56.  
  57. call:
  58.  
  59. On Linux:
  60. mkisofs -o isoimage_2.raw -R  -C xx,yy -M /dev/cdwriter_blk_dev  first_dir
  61.  
  62. On SunOS:
  63. mkisofs -o isoimage_2.raw -R  -C xx,yy -M target,lun first_dir
  64.  
  65.  
  66.  
  67. The argument of -C is the output of cdrecord -msinfo
  68. -    On Linux, the argument of -M is a device that would allow you to mount 
  69.     the current CD in the CD-writer
  70. -    On SunOS, target and lun refer to the SCSI target and lun of the 
  71.     CD-R device with the same notation as for cdrecord dev=xxx,yyy .
  72.  
  73.  
  74. If you want to check, whether mkisofs make everything right, you should create 
  75. another image by using the following command line.
  76.  
  77. On Linux:
  78. mkisofs -o isoimage_3.raw -R  -C xx,0 -M /dev/cdwriter_blk_dev  first_dir
  79.  
  80. On SunOS:
  81. mkisofs -o isoimage_2.raw -R  -C xx,0 -M target,lun first_dir
  82.  
  83. You may check ***this** image by mounting it with my "fbk" on Solaris 
  84. or the loopback driver on Linux.
  85.  
  86. On Linux type:
  87.     mount isoimage_3.raw -r -t iso9660 -o loop /mnt
  88.  
  89. On SunOS type:
  90.     mount -r -F fbk -o type=hsfs /dev/fbk0:isoimage_3.raw /mnt
  91.  
  92. For Solaris 8 and later you may also use the Sun lofi driver (see README.sun-lofi)
  93.  
  94. If you list /mnt, you should see all directories that have been in the first 
  95. session and the directory "second_dir". If you try to read a file from the
  96. first session, you will get an I/O error or bad data (depending on the
  97. block address), don't worry about that. If you try to read a file from
  98. the second session, you will see everything correctly.
  99.  
  100. To write the second session to CD, call:
  101.  
  102. cdrecord -v speed=2 dev=2,0 -eject -multi isoimage_2.raw
  103.  
  104. If you mount this CD, you should see the first session and the second directory 
  105. from 2nd session added to the root directory of the CD.
  106.  
  107.  
  108. Additional check:
  109.  
  110. call:
  111.  
  112. cdrecord -msinfo dev=2,0
  113.  
  114. The first number should be the first writable address which was retrieved by the
  115. first call to cdrecord -msinfo after creating the first session.
  116. The second number should be the first number + number of sectors of the second session
  117. + ~ 11400 sectors.
  118.  
  119. Note: The first lead-out is 1:30 (6750 sectors) the lead-in is 1:00 (4500 sectors)
  120. All following sessions need only 0:30 for lead-out (2250 sectors), the lead-in
  121. is also 1:00. So in theory, the can be 44 sessions on s 74 minute disk if you
  122. take into account that the minimum track size is 4 seconds.
  123.  
  124. Joerg Schilling
  125.